<template>
	<view class="list">
		<view class="possible" v-if="seachList.length">
			<view v-for="(item,index) in seachList" :key="index" class="item" @click="select(item, index)">
				<homography :query="item"></homography>
			</view>
			<u-loadmore :status="status" :load-text="loadText" margin-top="16"/>
		</view>

<!-- 		<view class="possible" v-else>
			<image :src="$IMG_URL('/static/home/nolist.png')" mode="" class="no_img"></image>
			<view class="no_size">
				暂无相关门店
			</view>
		</view> -->
	</view>
</template>

<script>
	import homography from './homography.vue'
	export default {
		components:{
			homography
		},
		props: {
			status: {
				type: String,
				default: 'nomore',
				required: true
			},
			seachList: {
				type: Array,
				default: [],
				required: true
			}
		},
		data() {
			return {
				loadText: {
					loadmore: '加载更多',
					loading: '正在加载...',
					nomore: '已经到底了'
				}
			}
		},
		methods: {
			select(item, index){
				this.$emit('select' , item, index)
			}
		}
	}
</script>

<style lang="scss">
	// 列表
	.list {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding-top: 8rpx;

		.item {
			margin-top: 16rpx;
			width: 702rpx;
			height: 208rpx;
			transition: all 0.3s ease;
			
			&:first-child {
				margin-top: 0;
			}
			
			&:active {
				transform: scale(0.99);
			}
		}

		.possible {
			display: flex;
			flex-direction: column;
			align-items: center;
			width: 100%;
		}

		.no_img {
			width: 194rpx;
			height: 160rpx;
			margin-top: 428rpx;
		}

		.no_size {
			font-size: 24rpx;
			font-family: PingFang SC, PingFang SC-Regular;
			font-weight: 400;
			text-align: center;
			color: #999999;
		}
	}
</style>